import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Page4 from './views/nav2/Page4.vue'
import Page5 from './views/nav2/Page5.vue'
import Page6 from './views/nav3/Page6.vue'
import echarts from './views/charts/echarts.vue'
import Department from './views/department/Department.vue'
import Eunuch from './views/test_cgf/Eunuch.vue'
import Emperor from './views/test_cgf/Emperor.vue'
import WMenu from './views/wsystem/WMenu.vue'
import WRole from './views/wsystem/WRole.vue'
import WPermission from './views/wsystem/WPermission.vue'
import baiduMap from './views/wsystem/map.vue'
//引入结算模块
import Account from './views/account/Account.vue'
import Client from './views/client/Client.vue'
import Maintain from './views/maintain/maintain.vue'

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '客户管理',
        iconCls: 'el-icon-user-solid',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/client', component: Client, name: '客户信息填入' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '维修管理',
        iconCls: 'el-icon-setting',//图标样式class
        children: [
            { path: '/maintain', component: Maintain, name: '维修单' },
        ]
    },
    //{ path: '/main', component: Main },
    {
        path: '/',
        component: Home,
        name: '组织结构',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/main', component: Main, name: '主页', hidden: true },
            { path: '/table', component: Table, name: '员工管理' },
            { path: '/form', component: Form, name: '表单管理' },
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/user', component: user, name: '客户管理' },
            { path: '/account', component: Account, name: '结算管理' },
            { path: '/eunuch', component: Eunuch, name: '太监管理' },
            { path: '/emperor', component: Emperor, name: '皇帝' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/page4', component: Page4, name: '配件管理' },
            { path: '/page5', component: Page5, name: '车模管理' }
        ]
    },
    {
        path: '/',
        component: Home,
        name: '其他设置',
        iconCls: 'fa fa-address-card',
        leaf: false,//只有一个节点
        children: [
            // { path: '/menu', component: ()=>import("./views/wsystem/WMenu.vue"), name: '菜单管理' },
            // { path: '/permission', component:  ()=>import("./views/wsystem/WPermission.vue"), name: '权限管理' },
            { path: '/menu', component: WMenu, name: '菜单管理' },
            { path: '/permission', component:  WPermission, name: '权限管理' },
            { path: '/role', component:  WRole, name: '角色管理' },
            { path: '/map', component:  baiduMap, name: '百度地图测试' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '报表管理',
        iconCls: 'fa fa-bar-chart',
        children: [
            { path: '/echarts', component: echarts, name: 'echarts' }
        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;